package net.neptech.service;

import net.neptech.model.dto.*;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * @Author Saya
 * @Date 2025/8/19 14:45
 * @Description TODO
 **/
public interface FlowableService {
    @Transactional
    String create(CreateFlowDto createFlowDto);

    @Transactional
    String start(InstanceParamDto flowInstanceParamDto);

    @Transactional
    void clearProcess(ClearFlowParamDto clearFlowParamDto);

    PageResultDto<TaskDto> queryTodoTask(TaskQueryParamDto taskQueryParamDto);

    PageResultDto<TaskDto> queryCompletedTask(TaskQueryParamDto taskQueryParamDto);

    PageResultDto<InstanceDto> queryCompletedInstance(QueryParamDto processQueryParamDto);

    @Transactional
    void complete(TaskParamDto taskParamDto);

    TaskResultDto queryTask(String taskId, Long staffId);

    List<SimpleApproveDescDto> queryTaskComments(VariableQueryParamDto paramDto);

    List<TaskDto> queryTaskAssignee(TaskParamDto taskParamDto);

    void delete(InstanceParamDto processInstanceParamDto);

    IndexPageStatistics querySimpleData(String userId);

    Map<String, Object> queryVariables(VariableQueryParamDto paramDto);
}
